home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbtools1.arc / AEINITFL.BAS < prev    next >
BASIC Source File  |  1987-01-11  |  2KB  |  39 lines

  1. rem $linesize:132
  2. rem $title:'Application Engineer Standard Routines'
  3. rem $subtitle:'Initialise new file's header record'
  4. '                Include the COMMON values
  5. rem $include:'AESHARED.BAS'            
  6.     
  7. sub Init.New.File(fl%,rlen%) static
  8.  
  9.         r%=rlen%-8%                      '  Rest of the record
  10.  
  11.         field #fl%,1 as stat$,2 as n.av$,2 as l.av$,1 as mj$,1 as mn$,1 as bug.fix$
  12.         field #fl%,8 as dummy$,r% as filler$
  13.  
  14. '  stat$    =  Status (1 = Open / 2 = Closed)
  15. '  n.av$    =  Next available record
  16. '  l.av$    =  Last available record
  17. '  mj$      =  Application Engineer Major release version
  18. '  mn$      =  Application Engineer Minor release version
  19. '  bug.fix$ =  Bug fix code within Minor release
  20.  
  21.         lset stat$=chr$(2%)              '  File closed
  22.         lset n.av$=mki$(2%)              '  Next available record in file
  23.         lset l.av$=mki$(2%)              '  Last available record in file
  24.         lset mj$=chr$(0%)                '  Version 0    (Pre-release)
  25.         lset mn$=chr$(0%)                '          0    (Pre-release)
  26.         lset bug.fix$=chr$(66)           '          B    (BETA testing)
  27.         lset filler$=string$(r%,0%)      '  Filler
  28.  
  29.         put #fl%,1                       '  Write header info
  30.  
  31.         field #fl%,2 as pt$,r%+6% as filler$
  32.  
  33.         lset pt$=mki$(-1%)               '  End of chain marker
  34.         lset filler$=string$(r%+6%,32%)  '  Initialize the record
  35.  
  36.         put #fl%,2%                      '  Write first available record info
  37.  
  38.     end sub
  39.